package cheme.Interpreter.AST.SystemSolver;

//import cheme.Parser.Parser;
import cheme.Interpreter.AST.SymbolTable.SymbolTable;

public class Solver implements IEnvironment
{
	SymbolTable symbolTable = null;
	
	public SymbolTable getSymbolTable()
	{
		if(null == symbolTable)
		{
			symbolTable = new SymbolTable();
		}
		
		return symbolTable;
	}

	public void solve(String s)
	{
//		Node head = (Node)Parser.parse(s);
//		
//		DeclarationVisitor v = new DeclarationVisitor(getSymbolTable());
//		IAstChemicalProcess process = (IAstChemicalProcess)head.accept(v, null);
//		
//		System.out.print(process.toString());
//		
//		IAstVariable var = getSymbolTable().get("M1");
//		var.getIdentifier().setString("newName");
//		System.out.print("\n\n" + process.toString());
//		
//		var.setValueKeepingType(22.0);
//		System.out.print("\n\n" + process.toString());
//		
//		var = getSymbolTable().get("M4");
//		var.getIdentifier().setString("silly name");
//		System.out.print("\n\n" + process.toString());
//		
//		var.setValueKeepingType(1.0);
//		System.out.print("\n\n" + process.toString());
//		
//		var.setValue(111.0);
//		System.out.print("\n\n" + process.toString());
 	}
}
